# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=libsemigroups
pkgver=2.7.2
pkgrel=1
pkgdesc='C++ library for semigroups and monoids'
url='https://libsemigroups.github.io'
arch=(loong64 x86_64)
license=(GPL3)
depends=(fmt
         gcc-libs
         glibc)
makedepends=(eigen)
source=(https://github.com/libsemigroups/libsemigroups/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('b054b87b4ab90127805efc88a49d3c503ae3368143c7774b179e225258ecb4dc')

prepare() {
  cd $pkgname-$pkgver
  ./autogen.sh
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
              --disable-hpcombi \
              --enable-fmt \
              --with-external-fmt \
              --with-external-eigen
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
